package com.cx.mapper;

import com.cx.pojo.Post;
import com.cx.pojo.PostExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PostMapper {
    int countByExample(PostExample example);

    int deleteByExample(PostExample example);

    int deleteByPrimaryKey(Integer postId);

    int insert(Post record);

    int insertSelective(Post record);

    List<Post> selectByExample(PostExample example);

    Post selectByPrimaryKey(Integer postId);

    int updateByExampleSelective(@Param("record") Post record, @Param("example") PostExample example);

    int updateByExample(@Param("record") Post record, @Param("example") PostExample example);

    int updateByPrimaryKeySelective(Post record);

    int updateByPrimaryKey(Post record);


    List<Post> selectByPostName(String postName);

    List<Post> selectByPostTime(@Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer selectByStatus();

    Integer updateStatusToZero(Integer postId);

    Integer updateStatusToOne(Integer postId);

    List<Post> selectPhoto();

    Integer updatePostCelAddOne(Integer postId);

    Integer updatePostCelDelOne(Integer postId);

}